package cn.edu.tjut.seriver.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.edu.tjut.bean.StudentBean;
import cn.edu.tjut.dao.StuDao;
import cn.edu.tjut.seriver.StuService;

@Service("StuInfoService")
public class StuInfoService implements StuService {
	@Resource
	private StuDao stuDao;

	@Override
	public StudentBean selectBystuIndex(String stuIndex) {
		// 根据主键查询学生信息
		return stuDao.selectBystuIndex(stuIndex);
	}

	@Override
	public List<StudentBean> selectAllstus() {
		// 查询所有学生信息
		return stuDao.selectAllstus();
	}

	@Override
	public StudentBean selectBystuId(Long stuId) {
		// 根据学号查询学生信息
		return stuDao.selectBystuId(stuId);
	}

	@Override
	public List<StudentBean> selectStuInfoDynamic(StudentBean stuB) {
		// 动态查询学生信息

		return stuDao.selectStuInfoDynamic(stuB);
	}

	@Override
	public int deleteBystuIndex(StudentBean stuB) {
		// 删除学生信息
		return stuDao.deleteBystuIndex(stuB);
	}

	@Override
	public int updateBystuIndex(StudentBean stuB) {
		// 修改学生信息
		return stuDao.updateBystuIndex(stuB);
	}

	@Override
	public int insertStuInfo(StudentBean stuB) {
		// 增加学生信息
		return stuDao.insertStuInfo(stuB);
	}

}
